﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooMarsGotDeviceQualityWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Mars.Got.DeviceQuality);
			Utils.BeginObjectRegister(type, L, translator, 0, 9, 3, 3);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetCurrentQuality", _m_SetCurrentQuality);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetCurrentQuality", _m_GetCurrentQuality);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "RegisterAction", _m_RegisterAction);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnRegisterAction", _m_UnRegisterAction);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "ChangeQuality", _m_ChangeQuality);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "ChangeCommanderHeadShow", _m_ChangeCommanderHeadShow);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "RegisterCommanderHeadAction", _m_RegisterCommanderHeadAction);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnRegisterCommanderHeadAction", _m_UnRegisterCommanderHeadAction);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClearAllActions", _m_ClearAllActions);
			
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "ZoomScale", _g_get_ZoomScale);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "m_currentQuality", _g_get_m_currentQuality);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "m_commanderHeadShow", _g_get_m_commanderHeadShow);
            
			Utils.RegisterFunc(L, Utils.SETTER_IDX, "ZoomScale", _s_set_ZoomScale);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "m_currentQuality", _s_set_m_currentQuality);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "m_commanderHeadShow", _s_set_m_commanderHeadShow);
            
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 1, 0);
			
			
            
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "Instance", _g_get_Instance);
            
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new Yoozoo.Mars.Got.DeviceQuality();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Mars.Got.DeviceQuality constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new Yoozoo.Mars.Got.DeviceQuality();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Mars.Got.DeviceQuality constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SetCurrentQuality(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    Yoozoo.Mars.Got.QualityEnum _eQuality;translator.Get(L, 2, out _eQuality);
                    
                    gen_to_be_invoked.SetCurrentQuality( _eQuality );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetCurrentQuality(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                        var gen_ret = gen_to_be_invoked.GetCurrentQuality(  );
                        translator.PushYoozooMarsGotQualityEnum(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RegisterAction(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    System.Action<Yoozoo.Mars.Got.QualityEnum> _aAction = translator.GetDelegate<System.Action<Yoozoo.Mars.Got.QualityEnum>>(L, 2);
                    
                    gen_to_be_invoked.RegisterAction( _aAction );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_UnRegisterAction(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    System.Action<Yoozoo.Mars.Got.QualityEnum> _aAction = translator.GetDelegate<System.Action<Yoozoo.Mars.Got.QualityEnum>>(L, 2);
                    
                    gen_to_be_invoked.UnRegisterAction( _aAction );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_ChangeQuality(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    Yoozoo.Mars.Got.QualityEnum _quality;translator.Get(L, 2, out _quality);
                    
                    gen_to_be_invoked.ChangeQuality( _quality );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_ChangeCommanderHeadShow(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    bool _isShowHead = LuaAPI.lua_toboolean(L, 2);
                    
                    gen_to_be_invoked.ChangeCommanderHeadShow( _isShowHead );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RegisterCommanderHeadAction(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    System.Action<bool> _aAction = translator.GetDelegate<System.Action<bool>>(L, 2);
                    
                    gen_to_be_invoked.RegisterCommanderHeadAction( _aAction );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_UnRegisterCommanderHeadAction(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    System.Action<bool> _aAction = translator.GetDelegate<System.Action<bool>>(L, 2);
                    
                    gen_to_be_invoked.UnRegisterCommanderHeadAction( _aAction );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_ClearAllActions(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.ClearAllActions(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_ZoomScale(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushnumber(L, gen_to_be_invoked.ZoomScale);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Instance(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    translator.Push(L, Yoozoo.Mars.Got.DeviceQuality.Instance);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_m_currentQuality(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
                translator.PushYoozooMarsGotQualityEnum(L, gen_to_be_invoked.m_currentQuality);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_m_commanderHeadShow(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.m_commanderHeadShow);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_ZoomScale(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.ZoomScale = (float)LuaAPI.lua_tonumber(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_m_currentQuality(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
                Yoozoo.Mars.Got.QualityEnum gen_value;translator.Get(L, 2, out gen_value);
				gen_to_be_invoked.m_currentQuality = gen_value;
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_m_commanderHeadShow(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Mars.Got.DeviceQuality gen_to_be_invoked = (Yoozoo.Mars.Got.DeviceQuality)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.m_commanderHeadShow = LuaAPI.lua_toboolean(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
